#!/usr/bin/env python
"""
This is just a file of user defined variables. Change these to change
the global directories which SSuMMo must search in to find the necessary
file.


The only other setting that would affect SSuMMo is the PYTHONPATH
environment variable. That can be set in your terminal's default
config file (for bash, it's ~/.bashrc)

Make sure that SSuMMo can import the following modules:-
MySQLdb	   - defined in PyPi as python-mysql
Bio	   - defined as python-biopython
subprocess - This works fine in CPython (the common one), but
             in IronPython (v2.6), the subprocess module is
             inadequate due to not supporting POSIX pipes.

Matplotlib & numpy are required for some of the post-processing
analyses, e.g. in rarefactionCurve.

If operating under a cluster environment, machine or group-specific 
settings should be specified here.
"""
import os
from sys import platform

######## ITOL info ########
#
# To use the IToL functionality, please first set up an
# account at http://itol.embl.de

# After you've logged in, select the tab button at the top 
# which shows "<your username>'s TREES AND DATA".
# At the top right of the page, click "Account Settings",
# and then click on "Enable / Disable batch upload".
# Set that up, and when you are provided with a unique
# ID, copy and paste it below into the itolID variable.
# For batch access to work, you must set up a `Project`
# on the IToL website. The name you give to that project
# must match that in the below variable `itolProject`.
# This is currently the only way to change where your tree
# gets saved on IToL.

itolID = '<MY_PERSONAL_ITOL_ID>'
itolProject = '<MY_ITOL_PROJECT>'

#############	MYSQL CONFIGURATION #####################

host = '<MY_SQL_SERVER>'
user = '<MY_SQL_USERNAME>'
passwd = '<MY_SQL_PASSWD>'
### The database 'db' must already exist with the above user
### granted 'all privileges.
db = '<MY_SQL_DB>'

#############	OS SPECIFIC SETTINGS.   ########################

###########    MAC
if platform == 'darwin':
    top = '/path/to/ssummo' # This path must point to the ssummo directory containing 'bin/'
    arbDBdir = '/Volumes/FASTHD/arbDB104'
    taxIndex = 'arbDB104.pkl'
    hmmerdir = '/usr/local/bin'
    arbdir = '' 
    hmmbuildCMD = 'hmmbuild'
    hmmsearchCMD = 'hmmsearch'
    VxtractorDir =  top+ '/vxtractor' 
#############   UBUNTU
elif platform == 'linux2':
    top = '/path/to/ssummo'
    arbDBdir = '/media/FASTHD/arbDB104'
    #hmmerdir = '/biol/people/albl500/bin/infernal/bin'	## Only hmmer version 3 and above are supported.
    hmmerdir = '/usr/local/bin'	## Only hmmer version 3 and above are supported.
    hmmer32dir = '/home/myusername/bin/hmmer32bit'  # Running on grid environment.
    taxIndex = 'arbDB104.pkl'
    hmmbuildCMD = 'hmmbuild'
    hmmsearchCMD = 'hmmsearch'
    VxtractorDir =  top + '/vxtractor' 
    hmmalignCMD = 'hmmalign'
    ## Can do host specific configurations.
    if  '<hostname>' in os.uname()[1] :
        top = '/a/different/ssummo/dir'
        arbDBdir = '/var/tmp/arbDB104'
        hmmerdir = '/usr/local/bin/'
        host = 'localhost'
        db = 'taxonomies'

############    WIN
## Any program depending on hmmer will fail in windows.
## Graph plotting software and everything else works fine though.
elif platform == 'win32':
    top = "C:\\Users\\username\\Documents\\PhD\\454RDPstuff\\arbDB"
    host = "192.168.0.111"
    arbDBdir = '\\metabuntu\SAS1\arbDB104'
    
